export default {
  data() {
    return {
      permission: {
        admin: false,
        element: false,
        share: false,
        training: false,
      },
    };
  },
  mounted() {
    this.menuPermission();
  },
  methods: {
    menuPermission() {
      if (this.$store && this.$store.getters) {
        let { menuData, userType } = this.$store.getters;
        if (!menuData) return;
        // console.log(userType);
        this.permission.admin = userType < 20;
        this.permission.element =
          menuData.filter((v) => v.id == 692).length != 0;
        this.permission.share = menuData.filter((v) => v.id == 712).length != 0;
        this.permission.training =
          menuData.filter((v) => v.id == 60).length != 0;
      }
    },
  },
};
